import { ref } from 'vue'
import { TypeApi } from './api'

export class TypeClass {
	list = ref()
	total = ref(0)
	constructor() {
		this.getList()
	}
	public getList() {
		const params = {
			currentPage: 1,
			pageSize: 10
		}
		TypeApi.getTable(params).subscribe((res: any) => {
			const { records = [], total = 0 } = res
			this.list.value = records
			this.total.value = total
		})
	}
}
